<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition>

        <p:dialog id="EstudianteCreateDlg" widgetVar="EstudianteCreateDialog" modal="true" resizable="false" appendTo="@(body)" header="#{bundle.CreateEstudianteTitle}">
            <h:form id="EstudianteCreateForm">
                <h:panelGroup id="display">
                    <p:panelGrid columns="2" rendered="#{estudianteController.selected != null}">
                        <p:outputLabel value="#{bundle.CreateEstudianteLabel_estudiantePK_codigo}" for="estudiantePK_codigo" />
                        <p:inputText id="estudiantePK_codigo" value="#{estudianteController.selected.estudiantePK.codigo}" title="#{bundle.CreateEstudianteTitle_estudiantePK_codigo}" required="true" requiredMessage="#{bundle.CreateEstudianteRequiredMessage_estudiantePK_codigo}"/>
                        <p:outputLabel value="#{bundle.CreateEstudianteLabel_semestre}" for="semestre" />
                        <p:inputText id="semestre" value="#{estudianteController.selected.semestre}" title="#{bundle.CreateEstudianteTitle_semestre}" />
                        <p:outputLabel value="#{bundle.CreateEstudianteLabel_programa}" for="programa" />
                        <p:inputText id="programa" value="#{estudianteController.selected.programa}" title="#{bundle.CreateEstudianteTitle_programa}" />
                        <p:outputLabel value="#{bundle.CreateEstudianteLabel_persona1}" for="persona1" />
                        <p:selectOneMenu id="persona1" value="#{estudianteController.selected.persona1}" required="true" requiredMessage="#{bundle.EditEstudianteRequiredMessage_persona1}">
                            <f:selectItems value="#{personaController.itemsAvailableSelectOne}"
                                           var="persona1Item"
                                           itemValue="#{persona1Item}"/>
                        </p:selectOneMenu>
                    </p:panelGrid>
                    <p:commandButton actionListener="#{estudianteController.create}" value="#{bundle.Save}" update="display,:EstudianteListForm:datalist,:growl" oncomplete="handleSubmit(args,'EstudianteCreateDialog');"/>
                    <p:commandButton value="#{bundle.Cancel}" onclick="EstudianteCreateDialog.hide()"/>
                </h:panelGroup>
            </h:form>
        </p:dialog>

    </ui:composition>
</html>
